//
//  SDPaientListData.m
//  SKinDiary
//
//  Created by pcyang on 16/7/12.
//  Copyright © 2016年 tencent. All rights reserved.
//

#import "SDPaientListData.h"
#import "SDPaientInfoItem.h"

@implementation SDPaientListModel
+ (NSString*)classNameForObjectInArrayProperty:(NSString*)property
{
    NSString* claName = nil;
    
    if([property isEqualToString:@"patients"])
    {
        claName = @"SDPaientInfoItem";
    }
    
    return claName;
    
}
@end

@implementation SDPaientListData
-(NSString*)getRequestUrl
{
    return [NSString stringWithFormat:@"%@/patient",[[SDServerSwitchManager sharedInstance] getServerUrl]];
}

- (id)resetWithResponseModel:(id)data
{
    if([data isKindOfClass:[NSDictionary class]])
    {
        _paientList = [SDPaientInfoItem modelsWithInfos:[data objectForKey:@"patients"]];
    }
    
    return data;
}
@end
